<?php
$vars['helper']->insertMessage();
$vars['helper']->setContainerClass('');

$vars['helper']->setTitle(__('Choose topic type'));
$defaultForumId = $vars['defaultForumId'];
?>

<div id="link-back">
<a class="button" 
	href="<?php echo $vars['helper']->createHref('Home')?>">
		<?php echo __('Home'); ?>
</a>
<a class="button" 
	href="<?php $vars['helper']->insertHref( 'Forum', 'displaySingleForum', array('forumId' => $defaultForumId )); ?>">
		<?php echo __('Discussions'); ?>
</a>
&nbsp;
<h4> <?php echo __('Choose topic type'); ?></h4>
</div>


<?php foreach( $vars['forums'] as $forum ): ?>
	<div class="rounded-box padded margined">
	<h4><?php echo $forum->getName(); ?></h4>
	<?php foreach( $vars['topicsFor'][$forum->getId()] as $typeManager ): 
		$topicName = $typeManager->getSimpleName();
		?>
		<a href="<?php
				$vars['helper']->insertHrefWithNonce('displayForm', 'Topic', 'displayForm', array( 'typeId' => $typeManager->getTypeId(), 'forumId' => $forum->getId() ) ); ?>"
			class="button"
			title="<?php echo $topicName; ?>"><?php echo $topicName ; ?></a>
	<?php endforeach ?>
	</div>
<?php endforeach ?>
